package net.roobook.server.system;

import net.roobook.common.annotation.EnableRoobookAuthExceptionHandler;
import net.roobook.common.annotation.EnableRoobookServerProtect;
import net.roobook.common.annotation.RoobookCloudApplication;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Author Roobook
 * @description 系统微服务
 * @date 2022/4/8
 */
@EnableDiscoveryClient  // 开启服务注册与发现
@SpringBootApplication
@EnableGlobalMethodSecurity(prePostEnabled = true)  // 开启Spring Cloud Security权限注解
// @EnableRoobookAuthExceptionHandler  //Enable注解实现资源服务器异常处理
// @EnableRoobookServerProtect // 使网关防护生效
@RoobookCloudApplication
@MapperScan("net.roobook.server.system.mapper")
@EnableTransactionManagement
public class RoobookServerSystemApplication {

    public static void main(String[] args) {
        SpringApplication.run(RoobookServerSystemApplication.class, args);
    }
}
